Verifies that a substring exists in a text string. If the substring is not found, the script fails and displays a message in the Errors pane.
This statement can be used to verify data returned from the WebGet and WebPost statements in load test scripts.
Syntax
CheckpointStringExists("TextToSearch", "TextToSearchFor")
Arguments
| Argument | Description |
|---|---|
| TextToSearch | String to search in. |
| TextToSearchFor | Substring to search for in the TextToSearch string. The search is case sensitive. |
Example
result = WebGet("/loginpage.php", "user", "Guest")
CheckpointStringExists(result, "success")